package com.panshi.repast.Util;

import android.graphics.Color;

/**
 * 获取背景颜色值
 * @author Administrator
 *
 */
public class StringColor {

	public static int getColor(String color) {
		return ifColorr(color);
	}

	private static int ifColorr(String color) {
		if (color.equals("Black")) {
			return Color.BLACK;
		} else if (color.equals("Blue")) {
			return Color.BLUE;
		} else if (color.equals("Cyan")) {
			return Color.CYAN;
		} else if (color.equals("Dkgray")) {
			return Color.DKGRAY;
		} else if (color.equals("Gray")) {
			return Color.GRAY;
		} else if (color.equals("Green")) {
			return Color.GREEN;
		} else if (color.equals("Ltgray")) {
			return Color.LTGRAY;
		} else if (color.equals("Magenta")) {
			return Color.MAGENTA;
		} else if (color.equals("RED")) {
			return Color.RED;
		} else if (color.equals("Transparent")) {
			return Color.TRANSPARENT;
		} else if (color.equals("White")) {
			return Color.WHITE;
		} else if (color.equals("Yellow")) {
			return Color.YELLOW;
		}
		return Color.BLACK;
	}
}
